<?php
    header("Content-Type:application/json");

	$conn = mysqli_connect('127.13.30.2','admin3R8pGpB','Vd8yi-7fciGM','wytweb');
	$sql="SET NAMES UTF8";
	mysqli_query($conn,$sql);

	$key=$_REQUEST['key'];
	$sql="SELECT * FROM kf_dish WHERE name LIKE '%$key%' OR material LIKE '%$key%'";
	$result=mysqli_query($conn,$sql);

	$orders=array();
	while($row=mysqli_fetch_assoc($result)){
		$orders[]=$row;
	}

	echo json_encode($orders);
?>